import Vue from 'vue'
import VueRouter from 'vue-router'
/*一级*/
import Account from '../components/page/Account';
import Engagement from '../components/page/Engagement';
import Company from '../components/page/Company';
import Patients from '../components/page/Patients';
/*二级*/
import Hcp from '../components/Account/Hcp';
import Hco from '../components/Account/Hco';
import Cluster from '../components/Account/Cluster';
import DoctorXx from '../components/Account/hcp/DoctorXx';
import DoctorXx1 from '../components/Account/administrative/DoctorXx1';
import HospitalXx from '../components/Account/hco/HospitalXx';
import ClusterXx from '../components/Account/cluster/ClusterXx';

import Meeting from '../components/Engagement/Meeting';
import ConferenceXx from '../components/Engagement/meeting/ConferenceXx';

import Labels from '../components/Company/Labels';
import LabelsXx from '../components/Company/labels/LabelsXx';
import LabelsXx1 from '../components/Company/labels1/LabelsXx1';
import LabelsXx2 from '../components/Company/labels2/LabelsXx2';
import LabelsXx3 from '../components/Company/labels3/LabelsXx3';
import Surveys from '../components/Company/Surveys';
import SurveysXx from '../components/Company/Surveys/SurveysXx';


import SocialListening from '../components/Patients/SocialListening';
/*三级*/
import Hcpz from '../components/Account/subset/Hcpz';
import Hcoz from '../components/Account/subset/Hcoz';
import Clusterz from '../components/Account/subset/Clusterz';
import Meetingz from '../components/Engagement/subset/Meetingz';
import Labelsz from '../components/Company/subset/Labelsz';
import Surveysz from '../components/Company/subset/Surveysz';

import Hemophilia from '../components/Patients/subset/Hemophilia';
import LungCancer from '../components/Patients/subset/LungCancer';
import Transplant from '../components/Patients/subset/Transplant';
/*四级*/
import Doctor from '../components/Account/subset/son/Doctor';
import Nurse from '../components/Account/subset/son/Nurse';
import A3 from '../components/Account/subset/son/A3';
import Group from '../components/Account/subset/son/Group';
import Conference from '../components/Engagement/subset/son/conference';
import Product from '../components/Company/subset/son/Product';
import surveysBu from '../components/Company/subset/son/surveysBu';


import Content from '../components/Company/Content';
import CompanyIndex from '../components/Company/content/index'
import container from '../components/Company/content/container'
import contentDetail from '../components/Company/contentDetail/contentDetail'

Vue.use(VueRouter);

export default new VueRouter({
  linkActiveClass: 'active',
  routes: [
    /*一级*/
    {
      path: '/',
      redirect: 'account'
    },
    /*account*/
    {
      path: '/account',
      component: Account,
      children: [
        {
          /*二级*/
          path: '/',
          redirect: 'hcp'
        },
        /*hcp*/
        {
          path: 'hcp',
          component: Hcp,
          children: [
            {
              /*三级*/
              path: '/',
              redirect: 'hcpz'
            },
            {
              path: 'hcpz',
              component: Hcpz,
              children: [
                {
                  /*四级*/
                  path: '/',
                  redirect: 'doctor'
                },
                {
                  path: 'doctor',
                  component: Doctor,
                },
                {
                  path: 'nurse',
                  component: Nurse,
                }
              ]
            },
          ]
        },
        /*hco*/
        {
          /*二级*/
          path: 'hco',
          component: Hco,
          children: [
            {
              /*三级*/
              path: '/',
              redirect: 'hcoz'
            },
            {
              path: 'hcoz',
              component: Hcoz,
              children: [
                {
                  /*四级*/
                  path: '/',
                  redirect: 'a3'
                },
                {
                  path: 'a3',
                  component: A3,
                },
              ]
            }
          ]
        },
        /*cluster*/
        {
          /*二级*/
          path: 'cluster',
          component: Cluster,
          children: [
            {
              /*三级*/
              path: '/',
              redirect: 'clusterz'
            },
            {
              path: 'clusterz',
              component: Clusterz,
              children: [
                {
                  /*四级*/
                  path: '/',
                  redirect: 'Group'
                },
                {
                  path: 'group',
                  component: Group,
                },
              ]
            }
          ]
        },
        /*医生详情页*/
        {
          path: 'doctorXx',
          component: DoctorXx,
        },
        {
          path: 'doctorXx1',
          component: DoctorXx1,
        },
        /*医院详情页*/
        {
          path: 'hospitalXx',
          component: HospitalXx,
        },
        /*Cluster详情页*/
        {
          path: 'clusterXx',
          component: ClusterXx,
        }
      ]
    },
    /*engagement*/
    {
      path: '/engagement',
      component: Engagement,
      children: [
        {
          /*二级*/
          path: '/',
          redirect: 'meeting'
        },
        {
          path: 'meeting',
          component: Meeting,
          children: [
            {
              /*三级*/
              path: '/',
              redirect: 'meetingz'
            },
            {
              path: 'meetingz',
              component: Meetingz,
              children: [
                {
                  /*四级*/
                  path: '/',
                  redirect: 'conference'
                },
                {
                  path: 'conference',
                  component: Conference,
                }
              ],
            }
          ]
        },
        /*会议详情页*/
        {
          path: 'ConferenceXx',
          component: ConferenceXx,
        }
      ]
    },
    /*company*/
    {
      path: '/company',
      component: Company,
      children: [
        {
          /*二级*/
          path: '/',
          redirect: 'labels'
        },
        {
          path: 'labels',
          component: Labels,
          children: [
            {
              /*三级*/
              path: '/',
              redirect: 'labelsz'
            },
            {
              path: 'labelsz',
              component: Labelsz,
              children: [
                {
                  /*四级*/
                  path: '/',
                  redirect: 'product'
                },
                {
                  path: 'product',
                  component: Product,
                },
              ]
            }
          ]
        },
        {
          path: 'surveys',
          component: Surveys,
          children: [
            {
              /*三级*/
              path: '/',
              redirect: 'surveysz'
            },
            {
              path: 'surveysz',
              component: Surveysz,
              children: [
                {
                  /*四级*/
                  path: '/',
                  redirect: 'surveysBu'
                },
                {
                  path: 'surveysBu',
                  component: surveysBu,
                },
              ]
            }
          ]
        },
        {
          path: 'content',
          component: Content,
          children: [
            {
              path: '/',
              component: CompanyIndex,
              children: [
                {
                  path: '/',
                  component: container
                }
              ]
            },
          ]
        },

        /*LABELS详情页*/
        {
          path: 'labelsXx',
          component: LabelsXx,
        },
        {
          path: 'labelsXx1',
          component: LabelsXx1,
        },
        {
          path: 'labelsXx2',
          component: LabelsXx2,
        },
        {
          path: 'labelsXx3',
          component: LabelsXx3,
        },
        /*surveys详情页*/
        {
          path: 'surveysXx',
          component: SurveysXx,
        },
        /*CompanyDetail详情页*/
        {
          path: 'content/:id',
          component: contentDetail
        }
      ]
    },
    /* patients */
    {
      path: '/patients',
      component: Patients,
      children: [
        {
          /*二级*/
          path: '/',
          redirect: 'socialListening'
        },
        {
          path: 'socialListening',
          component: SocialListening,
          children: [
            {
              /*三级*/
              path: '/',
              redirect: 'hemophilia'
            },
            {
              path: 'hemophilia',
              component: Hemophilia,
              children: []
            },
            {
              path: 'lungCancer',
              component: LungCancer,
              children: []
            },
            {
              path: 'transplant',
              component: Transplant,
              children: []
            }
          ]
        }
      ]
    }
  ]
})
